package cn.tanghom.app.system.aop;

import cn.tanghom.support.utils.PropertiesUtils;
import org.springframework.stereotype.Component;
import org.springframework.web.context.ServletContextAware;

import javax.servlet.ServletContext;

/**
 * appliction 设置
 * Created by tanghom on 2016/4/18.
 */
@Component
public class ConfigApplication implements ServletContextAware {


    @Override
    public void setServletContext(ServletContext servletContext) {
        String webRoot = PropertiesUtils.findPropertiesKey("web_root");
        servletContext.setAttribute("WEB_ROOT",webRoot);
    }
}
